package by.gravity.pvh.data.helper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class SQLDataManagerHelper extends SQLiteOpenHelper {

	public static final String DATA_BASE_NAME = "orders.db";

	private static final int DATABASE_VERSION = 1;

	public SQLDataManagerHelper(Context context) {
		super(context, DATA_BASE_NAME, null, DATABASE_VERSION);
	}
	
	private static final String CREATE_TABLE_ORDER = "CREATE TABLE IF NOT EXISTS "
			+ SQLConstants.TABLE_ORDER
			+ "("
			+ SQLConstants.FIELD_ID
			+ " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,"
			+ SQLConstants.FIELD_TYPE_ORDER
			+ " VARCHAR ,"
			+ SQLConstants.FIELD_NAME
			+ " VARCHAR ,"
			+ SQLConstants.FIELD_ORDER_DATA
			+ " VARCHAR ,"
			+ SQLConstants.FIELD_TIME
			+ " INTEGER);";
	
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_TABLE_ORDER);
	}
	

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
